<div id="view-content">
	<div class="content">
	<?php 
	foreach ($this->posts as $key=>$post) {
	?>
		<div class="third-section">
			<div class="down-box2">
				<div class="title3 title-right"><a href=""><?php echo $key;?></a></div>
				
				<div class="description">
					<ul class="description-other">
		           	<?php 
//		           	echo "<pre>";
//		           	print_r($post);
		                $i=0;
		                foreach ($post as $postKey) {
		                   	if ($i==0) {
		                   		$i++;
		                   		continue;
		                }
		                              	
		                echo '<li>
		                		<a href="'.$this->baseUrl('/default/view/?bv=').$postKey['baiVietId'].'">'.$postKey['tieuDe'].'</a>
		                	</li>';
		                }
		            ?>
		            </ul>
				</div>
			</div>
			
			
			<div class="down-box1">
				<div class="title3">
<!--				NHUNG MUC NAO CO BAI VIET THI SE ECHO RA LINK-->
					<a href="<?php if(!empty($post)) echo $this->baseUrl('default/vpages/?vp='.$post[0]['menu2Id']);?>">
					<?php echo $key;?>
					</a>
				</div>
				
				<div class="description1">
		        <?php 
		        	foreach ($post as $postKey) {
		               	echo '<h4 class="news-title">
		              			<a href="'.$this->baseUrl('/default/view/?bv=').$postKey['baiVietId'].'">'.$postKey['tieuDe'].'</a>
		                      </h4>';
			            echo 	'<a href="'.$this->baseUrl('default/view/?bv='.$postKey['baiVietId']).'">
									<img class="desc-img" src="/public/upload/images/'.$postKey["hinh"].'" style="float:right; margin:3px; margin-left:5px;">			            			
			            		</a>';
			            echo	$this->truncate($postKey['noiDung'],0,250).'</p>';
						break;
		             }
		        ?>
			    </div>
			</div>
		</div>
	<?php }?>
	</div>
	
	
	<div class="sidebar">
		<div class="comment">
			<div class="title3 ">Các ý kiến gần đây</div>
			<div class="description1" >
			<?php 
			foreach ($this->comments as $comment){
				echo '<p><a href="'.$this->baseUrl('default/comment/?id='.$comment['yKienId']).'" >'.$comment['chuDe'].'</a><p>';	
		
			}
			?>
				
			</div>
		</div>
		
		<div class="rand">
			<div class="title3">Bài viết nỗi bật</div>
			<div class="pics" id="randPost">
				<?php foreach ($this->randPosts as $rand) {
					echo '<a href="'.$this->baseUrl('default/view/?bv='.$rand['baiVietId']).'">
							<span>'.$rand['tieuDe'].'</span>
					    	<img src="/public/upload/images/'.$rand['hinh'].'" width="250" height="180" />
					    	
					      </a>';
				}?> 
				     
			</div> 
		</div>
		
		<div class="lnk-site">
			<div class="title3"> Liên kết Website</div>
			<div class="description">
				<p><a href="http://xahoithongtin.com.vn" target="_blank">Xã hội thông tin</a></p>
				<p><a href="http://tttt.danang.gov.vn" target="_blank">Sở thông tin và truyền thông Đà Nẵng</a></p>
				<p><a href="http://tttt.danang.gov.vn" target="_blank">Sở thông tin và truyền thông Đà Nẵng</a></p>
				<p><a href="http://tnmt.danang.gov.vn" target="_blank">Sở tài nguyên và môi trường Đà Nẵng</a></p>
			</div>
		</div>
		
		<div class="advs">
			<div class="title3">Dành cho quảng cáo</div>
			<a href="">
				<img alt="quang cao" src="/public/upload/images/viec_lam_viec_nam_right_300_155.gif">
			</a>
			<a href="">
				<img alt="quang cao" src="/public/upload/images/thiet_ke_web_trustvn_4.gif">
			</a>
			<a href="">
				<img alt="quang cao" src="/public/upload/images/khung_quang_cao_copy.jpg">
			</a>
		</div>
	</div>
</div>